package com.example.demo2.service.impl;

import com.example.demo2.entity.Method;
import com.example.demo2.mapper.MethodMapper;
import com.example.demo2.service.MethodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MethodServiceImpl implements MethodService {

    @Autowired
    private MethodMapper methodMapper;

    @Override
    public Method findById(Integer courseId) {
        return methodMapper.findById(courseId);
    }

    @Override
    public Method findByName(String courseName) {
        return methodMapper.findByName(courseName);
    }

    @Override
    public List<Method> findAll(Integer userId) {
        return methodMapper.findAll(userId);
    }

    @Override
    public boolean updateTargetById(Integer courseId, String teacheWay) {
        return methodMapper.updateTargetById(courseId,teacheWay);
    }

    @Override
    public boolean updateEvaluationById(Integer courseId, String evaluaKeywords) {
        return methodMapper.updateEvaluationById(courseId, evaluaKeywords);
    }


}
